import { S } from '../../s';
import { PSControlImpl } from '../pscontrol-impl';
import { IPSCaptionBar } from './ipscaption-bar';
import { IPSLanguageRes } from '../../res/ipslanguage-res';
import { IPSSysImage } from '../../res/ipssys-image';

export class PSCaptionBarImpl extends PSControlImpl implements IPSCaptionBar {
  protected cappslanguageres: IPSLanguageRes;
  getCapPSLanguageRes(): IPSLanguageRes | null {
    return (
      this.cappslanguageres ||
      (this.cappslanguageres = this.fillObjectModel(
        S._276,
        this.M.getCapPSLanguageRes,
        S._2a8,
      ) as IPSLanguageRes)
    );
  }

  get caption(): string {
    return this.M.caption;
  }

  protected pssysimage: IPSSysImage;
  getPSSysImage(): IPSSysImage | null {
    return (
      this.pssysimage ||
      (this.pssysimage = this.fillObjectModel(
        S._27b,
        this.M.getPSSysImage,
        S._2ad,
      ) as IPSSysImage)
    );
  }

  protected subcappslanguageres: IPSLanguageRes;
  getSubCapPSLanguageRes(): IPSLanguageRes | null {
    return (
      this.subcappslanguageres ||
      (this.subcappslanguageres = this.fillObjectModel(
        S._276,
        this.M.getSubCapPSLanguageRes,
        S._2b0,
      ) as IPSLanguageRes)
    );
  }

  get subCaption(): string {
    return this.M.subCaption;
  }
  get cls(): string {
    return 'PSCaptionBarImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._215) return true;
    return super.instanceof(cls);
  }
}
